package org.skyer.third.gateway.api.enums;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;


@NoArgsConstructor
@AllArgsConstructor
public enum PlatformEnum {
    //平台类型1:jd,2:sn ,3:suning-lt ,4:1688 ,5:wph,6: youzan ,7:beibei,8:taobao ,9:pdd ,10:hqbs, 11:yunji
    /**
     * 京东
     */
    JD("taskExecutorJd","jd","京东",1),
    /**
     * 苏宁
     */
    SUNING("taskExecutorSuNing","sn","苏宁",2),
    /**
     * 苏宁特卖
     */
    SUNINGTEMAI("taskExecutorSuNingTeMai","suning-lt","苏宁特卖",3),
    /**
     * 1688
     */
    ALIBABA("taskExecutorAlibaba","1688","阿里巴巴",4),
    /**
     * 唯品会
     */
    WEPINHUI("taskExecutorWeiPinHui","wph","唯品会",5),
    /**
     * 有赞
     */
    YOUZAN("taskExecutorYouZan","youzan","有赞",6),
    /**
     * 贝贝
     */
    BEIBEI("taskExecutorBeiBei","beibei","贝贝",7),
    /**
     * 淘宝
     */
    TAOBAO("taskExecutorTaoBao","taobao","淘宝",8),
    /**
     * 拼多多
     */
    PINGDUODUO("taskExecutorPinDuoDuo","pdd","拼多多",9),
    /**
     * 环球捕手
     */
    HUANQIUBUSHOU("taskExecutorHqbs","hqbs","环球捕手",10),
    /**
     * 云集
     */
    YUNJI("taskExecutorYunji","yunji","云集",11),

    /**
     * 快手
     */
    KUAISHOU("taskExecutorKuaiShou", "ks", "快手", 12),


    /**
     * 抖音
     */
    DOUYIN("taskExecutorOther", "dy", "抖音", 15),
    /**
     * 唯品会jitx
     */
    WEPINHUI_JITX("taskExecutorWeiPinHui", "wph_jitx", "唯品会jitx", 16),

    /**
     * 抖音代发
     */
    DOUYIN_DF("taskExecutorOther", "dy_df", "抖音代发", 17),

    /**
     * 天猫
     */
    TM("taskExecutorOther", "tm", "天猫", 18),
    /**
     * JD云仓
     */
    JD_YC("taskExecutorOther", "jd_yc", "京东云仓", 19),

    /**
     * 聚水潭
     */
    JU_SHUI_TAN("taskExecutorJst", "jst", "聚水潭",  20),

    /**
     * 天猫供销
     */
    TM_SAlES("taskExecutorOther", "tm_sales", "天猫供销", 21),


    /**
     * 苏宁厂送
     */
    SN_FD("taskExecutorOther", "sn_fd", "苏宁厂送", 22),

    /**
     * 鲸灵好衣库
     */
    JL_HYK("taskExecutorOther", "jl_hyk", "鲸灵好衣库", 23),

    /**
     * 阿里巴巴c2m
     */
    ALIBABA_C2M("taskExecutorOther", "1688_c2m", "淘工厂", 24),

    /**
     * 微信小店
     */
    WECHAT_SHOP("taskExecutorOther", "wechat_shop", "微信视频小号",25),

    /***
    *淘宝(易发货)
    */
    TAO_BAO_WMS("", "tb_wms", "WMS淘宝",  26),

    /***
     *旺店通
     */
    WDT("taskExecutorOther", "wdt", "旺店通", 27),

    /***
     *得物
     */
    DE_WU("", "de_wu", "得物", 32),

    /***
     *小红书
     */
    RED_BOOK("", "red_book", "小红书", 40),

    /***
     *童品云仓严选
     */
    TONG_PING("", "tong_ping", "童品云仓", 99),
    /**
     * 聚水潭分销订单
     */
    JU_SUI_TAN_FEN_XIAO("", "", "聚水潭分销订单",  100);

    private String threadName;
    private String redisKey;
    private String mean;
    private Integer id;

    public  static  String getName(Integer id){
        for(PlatformEnum en:PlatformEnum.values()){
            if(id.equals(en.getId())){
                return en.getMean();
            }
        }
        return  null;
    }

    public  static  Integer getId(String redisKey){
        for(PlatformEnum en:PlatformEnum.values()){
            if(redisKey.equals(en.getRedisKey())){
                return en.getId();
            }
        }
        return  null;
    }

    public  static  String getPlatName(Integer id){
        for(PlatformEnum en:PlatformEnum.values()){
            if(id.equals(en.getId())){
                return en.getRedisKey();
            }
        }
        return  null;
    }




    public String getThreadName() {
        return threadName;
    }

    public void setThreadName(String threadName) {
        this.threadName = threadName;
    }

    public String getRedisKey() {
        return redisKey;
    }

    public void setRedisKey(String redisKey) {
        this.redisKey = redisKey;
    }

    public String getMean() {
        return mean;
    }

    public void setMean(String mean) {
        this.mean = mean;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
}
